package com.class06.service.impl;

import com.class06.mapper.StudentMapper;
import com.class06.pojo.Student;
import com.class06.service.StudentService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService  {

    @Resource
    private StudentMapper studentMapper;
    @Override
    public void addStudent(Student student) {
        studentMapper.insertStudent(student);
    }



    @Override
    public List<Student> queryStudent() {
        List<Student> studentList = studentMapper.selectStudents();
        return studentList;
    }
}
